<?php

namespace Admin\Controller;

class OrderController extends AdminbaseController {

    function _initialize() {
        parent::_initialize();
        $this->currentModel = $this->orderModel;
    }

    //首页
    public function index() {

        $requestMap = $this->convertRequestToMap();

        //分页
        $count = $this->currentModel->getListCount($requestMap);
        $page = $this->page($count, C("DEFAULT_PAGE_SIZE"));

        //获取order列表
        $orderList = $this->currentModel->queryForList($page, $requestMap);

        $this->assign("bookingTimeEnum", C("BOOKING_TIME_ENUM"));
        $this->assign("statusEnum", C("ORDER_STATUS"));
        $this->assign('orderList', $orderList);
        $this->assign("page", $page->show('Admin', $this->parameter));
        $this->display();

    }

}